package service.SchoolRecruitManagement;

import entity.Recruitment;
import mapper.SchoolRecruitManagement.SchoolRecruitMapper;
import mapper.UserManagement.UserInfForEnMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.List;

@Service
public class SchoolRecruitService {

    @Autowired
    private SchoolRecruitMapper schoolRecruitMapper;

    @Autowired
    private UserInfForEnMapper userInfForEnMapper;

    public List<LinkedHashMap<String, Object>> select_recruitment(String userId) {
        List<LinkedHashMap<String, Object>> map = schoolRecruitMapper.select_recruitment(userId);
        return map;
    }

    public String findEnterpriseId(String phoneNumber) {
        return userInfForEnMapper.findEnterpriseId(phoneNumber);
    }

    public int addRecruitment(Recruitment recruitment) {
        return schoolRecruitMapper.addRecruitment(recruitment);
    }

    public List<LinkedHashMap<String, Object>> select_myrecruitment(String userId) {
        return schoolRecruitMapper.select_myrecruitment(userId);
    }
}
